﻿using System;

namespace Beeflys
{
    public sealed class Notify
    {
        public readonly static EmptyNotify Empty = new EmptyNotify();

        internal readonly static SystemNotify Awake = new SystemNotify(SystemNotifyType.AWAKE);
        internal readonly static SystemNotify Destroy = new SystemNotify(SystemNotifyType.DESTROY);
    }

    public sealed class EmptyNotify
    {
    }

    sealed class AddChildren
    {
        public string Host { get; set; }
        public string ActorName { get; set; }
        public Type ActorType { get; set; }
    }

    sealed class GetChildren
    {
        public string ActorName { get; set; }
    }

    sealed class DelChildren
    {
        public string ActorName { get; set; }
    }
    
    class SystemNotify
    {
        public SystemNotify(SystemNotifyType type)
        {
            this.type = type;
        }

        public readonly SystemNotifyType type;
    }

    sealed class SystemArgsNotify : SystemNotify
    {
        public SystemArgsNotify(object arg, SystemNotifyType type)
            : base(type)
        {
            this.arg = arg;
        }

        public readonly object arg;
    }

    enum SystemNotifyType
    {
        AWAKE,
        START,
        DESTROY
    }
}